import React from 'react';
import { useSelector } from 'react-redux';

export default function Loading() {
    console.log('re-render Loading');
    const loading = useSelector((state: any) => state.app.loading);

    return loading ? (
        <div className=' absolute top-0 left-0 bottom-0 right-0 flex items-center justify-center'>加载中</div>
    ) : null;
}
